package FileAndRecurison.递归;

/*
计算1-n的阶乘
*/
public class RecurisonTest03 {
    public static void main(String[] args) {
        int a = a(5);
        System.out.println(a);
    }

    private static int a(int i) {
        if (i == 1) {
            return 1;
        } else {
            return i * a(i - 1);
        }
    }
}
